/*
 *
 */
package org.jiscinvolve.astrodabis.barberry.common.data;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.junit.Test;
import org.junit.After;
import org.junit.Before;
import static org.junit.Assert.*;

import org.springframework.beans.factory.annotation.Autowired;  

import org.jiscinvolve.astrodabis.barberry.common.core.Tag;
import org.jiscinvolve.astrodabis.barberry.common.core.Account;

import org.jiscinvolve.astrodabis.barberry.common.core.CoreTestBase;

/*
 *
 */
public abstract class DataTestBase
extends CoreTestBase
    {


    public void compare(TapJoin join, TapRow one, TapRow two)
        {
        assertNotNull(
            one
            );
        assertNotNull(
            two
            );
        assertNotNull(
            join
            );
        assertNotNull(
            join.one()
            );
        assertNotNull(
            join.two()
            );
        compare(
            one,
            join.one()
            );        
        compare(
            two,
            join.two()
            );        
        }

    public void compare(TapJoin one, TapJoin two)
        {
        assertNotNull(
            one
            );
        assertNotNull(
            two
            );
/*
        assertEquals(
            one,
            two
            );
 */
        assertEquals(
            one.ident(),
            two.ident()
            );
        compare(
            one.one(),
            two.one()
            );
        compare(
            one.two(),
            two.two()
            );
        }


    public void compare(TapRow one, TapRow two)
        {
        assertNotNull(
            one
            );
        assertNotNull(
            two
            );
/*
        assertEquals(
            one,
            two
            );
 */
        assertEquals(
            one.ident(),
            two.ident()
            );
        assertEquals(
            one.value(),
            two.value()
            );
        compare(
            one.parent(),
            two.parent()
            );
        }

    public void compare(TapRow row, TapColumn column)
        {
        assertNotNull(
            row
            );
        assertNotNull(
            row.ident()
            );
        compare(
            column,
            row.parent()
            );        
        }

    public void compare(TapRow row, TapColumn column, String value)
        {
        assertNotNull(
            row
            );
        assertNotNull(
            row.value()
            );
        assertEquals(
            value,
            row.value()
            );
        compare(
            row,
            column
            );        
        }

    public void compare(TapColumn one, TapColumn two)
        {
        assertNotNull(
            one
            );
        assertNotNull(
            two
            );
/*
        assertEquals(
            one,
            two
            );
 */
        assertEquals(
            one.ident(),
            two.ident()
            );
        assertEquals(
            one.name(),
            two.name()
            );
        compare(
            one.parent(),
            two.parent()
            );
        }

    public void compare(TapTable one, TapTable two)
        {
        assertNotNull(
            one
            );
        assertNotNull(
            two
            );
/*
        assertEquals(
            one,
            two
            );
 */
        assertEquals(
            one.ident(),
            two.ident()
            );
        assertEquals(
            one.name(),
            two.name()
            );
        compare(
            one.parent(),
            two.parent()
            );
        }

    public void compare(TapService one, TapService two)
        {
        assertNotNull(
            one
            );
        assertNotNull(
            two
            );
/*
        assertEquals(
            one,
            two
            );
 */
        assertEquals(
            one.ident(),
            two.ident()
            );
        assertEquals(
            one.ivorn(),
            two.ivorn()
            );
        assertEquals(
            one.name(),
            two.name()
            );
        }


    public void compare(JoinTag one, JoinTag two)
        {
        assertNotNull(
            one
            );
        assertNotNull(
            two
            );
/*
        assertEquals(
            one,
            two
            );
 */
        assertEquals(
            one.ident(),
            two.ident()
            );
        assertEquals(
            one.join(),
            two.join()
            );
        assertEquals(
            one.tag(),
            two.tag()
            );
        }

    public void compare(JoinTag jointag, TapJoin join, Tag tag)
        {
        assertNotNull(
            jointag
            );
        assertNotNull(
            jointag.ident()
            );
        compare(
            jointag.join(),
            join
            );        
        compare(
            jointag.tag(),
            tag
            );        
        }


    public void compare(RowTag one, RowTag two)
        {
        assertNotNull(
            one
            );
        assertNotNull(
            two
            );
/*
        assertEquals(
            one,
            two
            );
 */
        assertEquals(
            one.ident(),
            two.ident()
            );
        assertEquals(
            one.row(),
            two.row()
            );
        assertEquals(
            one.tag(),
            two.tag()
            );
        }

    public void compare(RowTag rowtag, TapRow row, Tag tag)
        {
        assertNotNull(
            rowtag
            );
        assertNotNull(
            rowtag.ident()
            );
        compare(
            rowtag.row(),
            row
            );        
        compare(
            rowtag.tag(),
            tag
            );        
        }

    }

